home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue68 / sync / FileGroupApp.dpr < prev    next >
Encoding:
Text File  |  2001-02-26  |  477 b   |  25 lines

  1. //TGpFileGroup demo - Application part
  2.  
  3. program FileGroupApplication;
  4. {$APPTYPE CONSOLE}
  5. uses
  6.   SysUtils,
  7.   GpFileSync;
  8.  
  9. var
  10.   grp: TGpFileGroup;
  11.  
  12. begin
  13.   grp := TGpFileGroup.Create('demo.grp');
  14.   try
  15.     if not grp.Join(5000) then
  16.       Writeln('Cannot join.')
  17.     else begin
  18.       try
  19.         Writeln('Application running, press Enter to terminate...');
  20.         Readln;
  21.       finally grp.Leave(5000) end;
  22.     end;
  23.   finally FreeAndNil(grp); end;
  24. end.
  25.